package trabajoISW2.tests;

import org.junit.Before;
import org.junit.Test;

import trabajoISW2.domain.contracts.IInvoice;
import trabajoISW2.domain.implementations.CreditCard;
import trabajoISW2.domain.implementations.Order;



public class InvoiceTestSuite {

	IInvoice in;
	SuperTest st;
	Order or;
	CreditCard cc;
	
	@Before
	public void setup(){
		st = new SuperTest();
		st.inicializa();
		in = st.invoice1;
		or = st.order1;
		cc = st.creditCard1;
		
		
	}
	
	//Pruebas sobre el m�todo setInvoiceId
	
	@Test
	public void testSetOrder(){
		in.setOrder(or);

	}
	
	@Test(expected = IllegalArgumentException.class)
	public void testSetOrder2(){
		in.setOrder(null);
		
	}
	
	@Test
	public void testSetCreditCard(){
		in.setCreditCard(cc);

	}
	
	@Test(expected = IllegalArgumentException.class)
	public void testSetCreditCard2(){
		in.setCreditCard(null);
		
	}

	
}
